package com.mxdx.edu.service.impl;

import com.mxdx.edu.dao.TutorshipDao;
import com.mxdx.edu.service.ITutorshipService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 学习信息service
 *
 * @author howie
 */
@Service
public class TutorshipServiceImpl implements ITutorshipService {

	@Resource
	private TutorshipDao tutorshipDao;

	@Override
	public Map<String, Object> findMapByTutorshipId(String tutorshipId) {
		Map<String, Object> param = new HashMap<>();
		param.put("tutorshipId", tutorshipId);
		List<Map<String, Object>> list = tutorshipDao.findListByMap(param);
		if(list != null && list.size()>0){
			return list.get(0);
		}
		return null;
	}

	@Override
	public List<Map<String, Object>> findListByMap(Map<String, Object> param) {
		return tutorshipDao.findListByMap(param);
	}
}
